package com.wan37.logic.domain.vo;

import com.wan37.logic.domain.entity.UserDO;

/**
 * @author : luoyong
 * @date : 2020-07-08 11:41
 **/
public class UserVO {
    private String userId;
    private String name;
    private long gold;
    private long ingot;
    private long backpackNumber;

    public long getBackpackNumber() {
        return backpackNumber;
    }

    public void setBackpackNumber(long backpackNumber) {
        this.backpackNumber = backpackNumber;
    }

    public UserVO() {
    }

    public UserVO(UserDO userDO) {
        this.userId = userDO.getUserId();
        this.name = userDO.getNickname();
        this.gold = userDO.getGold();
        this.ingot = userDO.getIngot();
        this.backpackNumber = userDO.getBackpackNumber();
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public synchronized long getGold() {
        return gold;
    }

    public synchronized void setGold(long gold) {
        this.gold = gold;
    }

    public synchronized long getIngot() {
        return ingot;
    }

    public synchronized void setIngot(long ingot) {
        this.ingot = ingot;
    }

    @Override
    public String toString() {
        return "UserVO{" +
                "userId='" + userId + '\'' +
                ", name='" + name + '\'' +
                ", gold=" + gold +
                ", ingot=" + ingot +
                '}';
    }
}
